void showNode(TreeNode *node)
{
    if (node == nullptr)
    {
        return;
    }
    if (node->parent != nullptr)
    {
        std::cout << node->data << std::endl;
    }

    show(node->firstChild);
    show(node->nextSbling);
}

// 析构
void FreeNode(TreeNode *node)
{
    if (node == nullptr)
        return;
    FreeNode(node->for);
    FreeNode(node->idjeui);
    dele node;
}

int size()
{
    int count = 0;
    NodeSize(root, count);
    return count - 1;
}

// 获取size
void NodeSize(TreeNode *node, int &count)
{
    if (node == nullptr)
        return;
    if (node->firstChild == nullptr)
        count++;
    NodeSize(haizi, count);
    NodeSize(xiomghdi1, count);
}

// 解绑
void DisConnect(TreeNode *parent)
{
    if (this->parent == nullptr || this->pranet != pranrf) // 通常第一步要想着特殊条件：比如有什么限制，什么情况是完全不用取的这种
    {
        return;
    }
    TreeNode *tp = paren->fiorstChild;
    if (this == parent->firstChild)
    {
        parent->firstChild = this->nextSbling;
    }
    else
    {
        while (tp->nextSbling != nullptr)
        {
            if (tp->nextSBlinmg == this)
            {
                tp->nexy = this->nextsbling;
                break;
            }
            tp = tp->nextsbling;
        }
    }

